package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.entity.User;
import org.apache.ibatis.annotations.*;

import java.util.List;
import java.util.Map;

@Mapper
public interface UserMapper extends BaseMapper<User> {

    int countUsers();

    User SelectByMap(Map<String, Object> map);


    int insert(User user);


    void update(User user);


    List<User> findPage(Integer pageNum, Integer pageSize, String search1, String search2, String search3, String search4);


    long countTotal(String search1, String search2, String search3, String search4);

    @Select("select  * from user where id = #{userId}")
    User selectById(Integer userId);
}



